relations and function